package com.atguigu.influxdb.util;

import org.influxdb.dto.QueryResult;

import java.util.List;

/**
 * @ClassName Test
 * @DeScription TODO
 * @Author 剧情再美终是戏
 * @Date 2019/12/26 21:19
 * @Version 1.0
 **/
public class Test {

    public static void main(String[] args) {
        InfluxDBConnection influxDBConnection =
                new InfluxDBConnection("root", "root", "http://192.168.2.83:8086", "mydb", null);

        System.out.println(influxDBConnection);

        // 测试查询
        QueryResult query = influxDBConnection.query("select * from f3");

        List<QueryResult.Result> results = query.getResults();

        for (QueryResult.Result result : results) {
            System.out.println(result);
        }
    }

}
